{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar" style="display:inline-block; margin-right:100px">
                        <a class="btn btn-default btn-outline {present name='types'}{eq name='types' value='1'}asdlkjasd{/eq}{else /}asdlkjasd{/present}"
                           href="{:url('alipay',['types'=>'1'])}">收款</a>
                        <a class="btn btn-default btn-outline {eq name='types' value='2'}asdlkjasd{/eq}"
                           href="{:url('alipay',['types'=>'2'])}">转账</a>
                    </div>
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                <tr>
                                    <th data-align="center">类型</th>
                                    <th data-align="center">APPID</th>
                                    <th data-align="center">选择</th>
                                    <th data-align="center">备注</th>
                                    <th data-align="center">管理</th>
                                </tr>
                                </thead>
                                <tbody id="form">
                                {volist name="data" id="v"}
                                <tr class="class">
                                    <td>
                                        {if condition="$v.types==2"}
                                        <span class="btn btn-primary btn-xs" style="background-color:#D8BFD8;border-color:#D8BFD8">转账</span>
                                        {elseif condition="$v.types==1"}
                                        <span class="btn btn-primary btn-xs" style="background-color:#ADD8E6;border-color:#ADD8E6">收款</span>
                                        {/if}
                                    </td>
                                    <td>{$v.appid}</td>
                                    <td>{eq name='$v.is_select' value='1'}<span style="color: #1ab394; ">已选</span>{/eq}</td>
                                    <td>{$v.remark}</td>
                                    <td>
                                        <div class="btn-group">
                                            <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span>
                                            </div>
                                            <ul class="dropdown-menu">
                                                <li><a onClick="add('{:url('addAlipay',['id'=>$v['id'], 'url' => -1])}')">修改</a></li>
                                                <li class="divider"></li>
                                                <li><a onClick="del({$v.id})" style="color:red">删除</a></li>
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages">{$page}</div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript">

    $(document).ready(function(){
        $('#delidAll').click(function(){
            $('input[type=checkbox]').each(function(){
                var self=$(this);
                if(!self.prop('checked')){
                    self.prop('checked',true);
                }else{
                    self.prop('checked',false);
                }
            });
        })
    });

    function del(id){
        swal_del(id,"{:url('delAlipay')}")
    }
</script>
